package com.yanftch.hdc_tools.storage

import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.Service
import com.intellij.openapi.components.State
import com.intellij.openapi.components.Storage
import com.intellij.util.xmlb.XmlSerializerUtil


@Service(Service.Level.PROJECT)
@State(name = "HdcPluginState", storages = [Storage("hdc_tools_info_settings.xml")])
class PluginState : PersistentStateComponent<PluginState> {
    var bundleName: String = ""
    var defaultAbility: String = ""
    var hdcPath: String = ""

    override fun getState(): PluginState? {
        return this
    }

    override fun loadState(pluginState: PluginState) {
        XmlSerializerUtil.copyBean(pluginState, this)
    }
}